package cn.com.zhuxulin.android.demos.activities;

import android.app.Activity;
import android.os.Build;
import android.os.Bundle;
import android.widget.TextView;
import android.widget.Toast;
import cn.com.zhuxulin.android.demos.R;

public class BuildVersion extends Activity {
	private String version = null;
	private TextView showInfo = null;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.build_version);
		showInfo = (TextView) findViewById(R.id.version);
	}

	@Override
	protected void onStart() {
		super.onStart();
		Toast.makeText(this, Build.VERSION.SDK_INT, Toast.LENGTH_LONG).show();
		version = "";
		version += "VERSION.CODENAME" + Build.VERSION.CODENAME + "\n";
		version += "VERSION.INCREMENTAL" + Build.VERSION.INCREMENTAL + "\n";
		version += "VERSION.RELEASE" + Build.VERSION.RELEASE + "\n";
		version += "VERSION.SDK" + Build.VERSION.SDK + "\n";
		version += "VERSION.SDK_INT" + Build.VERSION.SDK_INT + "\n";

		version += "VERSION_CODES.BASE" + Build.VERSION_CODES.BASE + "\n";
		version += "VERSION_CODES.BASE_1_1" + Build.VERSION_CODES.BASE_1_1
				+ "\n";
		version += "VERSION_CODES.CUPCAKE" + Build.VERSION_CODES.CUPCAKE + "\n";
		version += "VERSION_CODES.CUR_DEVELOPMENT"
				+ Build.VERSION_CODES.CUR_DEVELOPMENT + "\n";
		version += "VERSION_CODES.DONUT" + Build.VERSION_CODES.DONUT + "\n";
		version += "VERSION_CODES.ECLAIR" + Build.VERSION_CODES.ECLAIR + "\n";
		version += "VERSION_CODES.ECLAIR_0_1" + Build.VERSION_CODES.ECLAIR_0_1
				+ "\n";
		version += "VERSION_CODES.ECLAIR_MR1" + Build.VERSION_CODES.ECLAIR_MR1
				+ "\n";
		version += "VERSION_CODES.FROYO" + Build.VERSION_CODES.FROYO + "\n";

		version += "Build" + Build.BRAND + "\n";
		version += "Build" + Build.BOOTLOADER + "\n";
		version += "Build" + Build.BRAND + "\n";
		version += "Build" + Build.CPU_ABI + "\n";
		version += "Build" + Build.CPU_ABI2 + "\n";
		version += "Build" + Build.DEVICE + "\n";
		version += "Build" + Build.DISPLAY + "\n";
		version += "Build" + Build.FINGERPRINT + "\n";
		version += "Build" + Build.HARDWARE + "\n";
		version += "Build" + Build.HOST + "\n";
		version += "Build" + Build.ID + "\n";
		version += "Build" + Build.MANUFACTURER + "\n";
		version += "Build" + Build.MODEL + "\n";
		version += "Build" + Build.PRODUCT + "\n";
		version += "Build" + Build.RADIO + "\n";
		version += "Build" + Build.TAGS + "\n";
		version += "Build" + Build.TIME + "\n";
		version += "Build" + Build.TYPE + "\n";
		version += "Build" + Build.UNKNOWN + "\n";
		version += "Build" + Build.USER + "\n";
		showInfo.setText(version);
	}
}
